<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>条件判断</title>
</head>
<body>
<h2>th:if用法(th:unless与之相反)</h2>
<div th:if="${sex eq 1}">
  男
</div>
<div th:if="${sex eq 0}">
  女
</div>

<h2>th:switch/th:case</h2>
<div th:switch="${productType}">
    <span th:case="0">产品0</span>
    <span th:case="1">产品1</span>
    <span th:case="*">无此产品</span>
</div>
</body>
</html>